using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Resources;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.ICM
{
	[DataContract, Table("IcmRequisition")]
    public class Requisition
    {

		[DataMember, Display(Name = "RequisitionCode", ResourceType = typeof(Resources.RequisitionResource))]
        public string RequisitionCode { get; set; }

		[DataMember, Display(Name = "RequisitionDate", ResourceType = typeof(Resources.RequisitionResource))]
        public Nullable<System.DateTime> RequisitionDate { get; set; }

		[ForeignKey("JobSite")]
		[DataMember, Display(Name = "JobSiteId", ResourceType = typeof(Resources.RequisitionResource))]
        public Nullable<int> JobSiteId { get; set; }

		[ForeignKey("RequestEmp")]
		[DataMember, Display(Name = "RequestEmpId", ResourceType = typeof(Resources.RequisitionResource))]
        public Nullable<int> RequestEmpId { get; set; }

		[ForeignKey("IcmObjType")]
		[DataMember, Display(Name = "IcmObjTypeId", ResourceType = typeof(Resources.RequisitionResource))]
        public Nullable<int> IcmObjTypeId { get; set; }

		[DataMember, Display(Name = "Description", ResourceType = typeof(Resources.RequisitionResource))]
        public string Description { get; set; }

		[DataMember, Display(Name = "Remark", ResourceType = typeof(Resources.RequisitionResource))]
        public string Remark { get; set; }

		[DataMember, Display(Name = "RecordStatus", ResourceType = typeof(Resources.RequisitionResource))]
        public string RecordStatus { get; set; }

		[DataMember, Display(Name = "ApproveFlag", ResourceType = typeof(Resources.RequisitionResource))]
        public Nullable<bool> ApproveFlag { get; set; }

		[ForeignKey("ApproveEmp")]
		[DataMember, Display(Name = "ApproveEmpId", ResourceType = typeof(Resources.RequisitionResource))]
        public Nullable<int> ApproveEmpId { get; set; }

		[DataMember, Display(Name = "ApproveWhen", ResourceType = typeof(Resources.RequisitionResource))]
        public Nullable<System.DateTime> ApproveWhen { get; set; }

		[DataMember, Display(Name = "CancelFlag", ResourceType = typeof(Resources.RequisitionResource))]
        public Nullable<bool> CancelFlag { get; set; }

		[DataMember, Display(Name = "CancelRemark", ResourceType = typeof(Resources.RequisitionResource))]
        public string CancelRemark { get; set; }

		[DataMember, Display(Name = "CancelBy", ResourceType = typeof(Resources.RequisitionResource))]
        public Nullable<int> CancelBy { get; set; }

		[DataMember, Display(Name = "CancelWhen", ResourceType = typeof(Resources.RequisitionResource))]
        public Nullable<System.DateTime> CancelWhen { get; set; }

		[DataMember, Display(Name = "CreatedBy", ResourceType = typeof(Resources.RequisitionResource))]
        public Nullable<int> CreatedBy { get; set; }

		[DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(Resources.RequisitionResource))]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

		[DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(Resources.RequisitionResource))]
        public Nullable<int> UpdatedBy { get; set; }

		[DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(Resources.RequisitionResource))]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }

		[DataMember, Display(Name = "CutstockBy", ResourceType = typeof(Resources.RequisitionResource))]
        public Nullable<int> CutstockBy { get; set; }

		[DataMember, Display(Name = "CutstockWhen", ResourceType = typeof(Resources.RequisitionResource))]
        public Nullable<System.DateTime> CutstockWhen { get; set; }

		[DataMember, Display(Name = "MovementCode", ResourceType = typeof(Resources.RequisitionResource))]
        public string MovementCode { get; set; }

		public virtual HRM.JobSite JobSite { get; set; }

		public virtual HRM.Employee RequestEmp { get; set; }

		public virtual MasObjectType IcmObjType { get; set; }

		public virtual HRM.Employee ApproveEmp { get; set; }

    }
}